<template>
	<view>
		<fa-navbar :title="title"></fa-navbar>
		<text class="m-30">{{content}}</text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:undefined,
				content:undefined
			}
		},
		onLoad(options) {
			console.log(options)
	        this.setUpdateReadState(options.guid)
			if (options.type === 'FASG_NOTIFY_TYPE0001') {
				this.title = "资产录入";
			} else if (options.type === 'FASG_NOTIFY_TYPE0003') {
				this.title = "资产处置";
			} else if (options.type === 'FASG_NOTIFY_TYPE0004') {
				this.title = "资产盘点";
			} else if (options.type === 'FASG_NOTIFY_TYPE0006')  {
				this.title = "报警";
			} else {
				this.title = "报警";
			}
			this.content = options.content;
		},
		
		methods: {
			setUpdateReadState(guid) {
				let params = {
					Guid: guid,
					IsRead: 1
				}
				this.$api.setUpdateReadState(params)
					.then(res => {
						console.log(res.data);
					})
					.catch(err => console.error(err));
			},
		}
	}
</script>

<style>

</style>
